Ext.onReady(function(){
	checkProjectName();
	
	Ext.BLANK_IMAGE_URL = '/js/extjs/resources/images/default/s.gif';
	Ext.form.Field.prototype.msgTarget = 'under';
	Ext.MessageBox.buttonText.yes = "Si";
	Ext.MessageBox.buttonText.no = "No";
	var formPanelPROD = generateForm(getProjectName() + '/products/new', dsPROD);
	
	var url_clientrequirements = 'clientrequirements.html?project=' + getProjectName();
	var url_productrequirement = 'productrequirements.html?project=' + getProjectName();
	var url_products = 'products.html?project=' + getProjectName();
	var url_trazabilidad = 'trazability.html?project=' + getProjectName();
	
	var viewport = new Ext.Viewport({
			layout: 'border',
			items: [				
				new Ext.Panel({ 
					id: 'north-panel',
					region:'north',
					contentEl: 'header',
					frame: true,
					bbar:[
						{ text: 'Requerimientos de Cliente', handler: function() { ir(url_clientrequirements);}},
						'-',
						{ text: 'Requerimientos de Sistema', handler: function() {ir(url_productrequirement);}},
						'-',
						{ iconCls: 'icon-collapse-all', text: 'Productos', handler: function() {ir(url_products);}},
						'-',
						{ text: 'Trazabilidad', handler: function() {ir(url_trazabilidad);}}
						]
					
				}),
				{
				region:'east',
				id: 'work-panel',
				title: ' ',
				collapsible: true,
				split:true,
				width: 300,
				minSize: 250,
				maxSize: 400,
				margins:'0 5 0 0',
				items: new Ext.TabPanel({
					id: 'tab-panel-east-cr',
					border: false,
					activeTab: 0,
					items: [{
						html: '<div>Aca el Resumen</div>',
						title: 'Resumen',
						autoScroll: true
						},
						{
						items: formPanelPROD,
						title: 'Agregar',
						autoScroll: true							
						}
						]
					
					})
				},					
				new Ext.Panel({
				region:'center',
				id: 'center-panel',
				title: '',
				layout: 'fit',
				collapsible: true,
				split:true,
				items: gridPROD
				})
			]	
	});
});



			

